Plug a small memory leak
authorMatthias Clasen <matthiasc@src.gnome.org>
Fri, 19 Sep 2008 14:34:22 +0000 (14:34 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 19 Sep 2008 14:34:22 +0000 (14:34 +0000)
svn path=/trunk/; revision=21451

gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-io.c

index 619ddddedf96d3b7229aa89c32f220178dbc19d0..27f0a94f1a25a328a781003d73d5d3a468472972 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-19  Matthias Clasen  <mclasen@redhat.com>
+
+       * gdk-pixbuf-io.c: Don't call fill_info if we've already filled
+       the info from the module file, fixes a small memory leak.
+
 2008-09-18  Dominic Lachowicz  <domlachowicz@gmail.com>
 
        * io-gdip-utils.c: Fix 2 cases where we leaked a GpImage (#552545)
index d6ddce76a22448ba1b94701201f997fc599f951f..c24d4560661f56c1cd2dcd94c3e5288e4e44bf56 100644 (file)
@@ -678,9 +678,10 @@ gdk_pixbuf_load_module_unlocked (GdkPixbufModule *image_module,
         if (fill_vtable) {
                image_module->module = (void *) 1;
                 (* fill_vtable) (image_module);
-               image_module->info = g_new0 (GdkPixbufFormat, 1);
-               (* fill_info) (image_module->info);
-
+               if (image_module->info == NULL) {
+                       image_module->info = g_new0 (GdkPixbufFormat, 1);
+                       (* fill_info) (image_module->info);
+               }
                 return TRUE;
        }
        else